﻿<navigation:Page x:Class="WellDone.Configuration" 
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
           xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
           mc:Ignorable="d"
           xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" 
           xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"
           d:DesignWidth="640" d:DesignHeight="480"
           Title="Configuration Page" Loaded="Page_Loaded">
    <Grid x:Name="LayoutConfiguration">
        <sdk:TabControl>
            <sdk:TabItem Header="Settings" Height="26" VerticalAlignment="Bottom" >
                <StackPanel Margin="0,0,0,0" Orientation="Vertical">
                    <Grid x:Name="LayoutSetting" Margin="2,2,1,7" Height="420">
                        <Grid.RowDefinitions>
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <sdk:DataGrid x:Name="dgConfigurationItems" SelectionMode="Single" AutoGenerateColumns="False" HorizontalAlignment="Left" Height="355" Margin="10,10,0,0" VerticalAlignment="Top" Width="506">
                            <sdk:DataGrid.ColumnHeaderStyle>
                                <Style  TargetType="sdk:DataGridColumnHeader" >
                                    <Setter Property="FontSize" Value="10" />
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate>
                                                <Grid Name="Root">
                                                    <VisualStateManager.VisualStateGroups>
                                                        <VisualStateGroup x:Name="CommonStates">
                                                            <VisualStateGroup.Transitions>
                                                                <VisualTransition GeneratedDuration="00:00:0.1" />
                                                            </VisualStateGroup.Transitions>
                                                            <VisualState x:Name="Normal" />
                                                            <VisualState x:Name="MouseOver" />
                                                        </VisualStateGroup>
                                                    </VisualStateManager.VisualStateGroups>
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition Height="*" />
                                                        <RowDefinition Height="*" />
                                                        <RowDefinition Height="Auto" />
                                                    </Grid.RowDefinitions>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="Auto" />
                                                        <ColumnDefinition Width="*" />
                                                    </Grid.ColumnDefinitions>

                                                    <Rectangle x:Name="BackgroundRectangle" Stretch="Fill" Fill="#FF1F3B53" Grid.ColumnSpan="2" Grid.RowSpan="2"/>

                                                    <Rectangle x:Name="BackgroundGradient" Stretch="Fill" Grid.ColumnSpan="2" Grid.RowSpan="2">
                                                        <Rectangle.Fill>
                                                            <LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
                                                                <GradientStop Color="#FFFFFFFF" Offset="0.015" />
                                                                <GradientStop Color="#F9FFFFFF" Offset="0.375" />
                                                                <GradientStop Color="#E5FFFFFF" Offset="0.6" />
                                                                <GradientStop Color="#C6FFFFFF" Offset="1" />
                                                            </LinearGradientBrush>
                                                        </Rectangle.Fill>
                                                    </Rectangle>

                                                    <ContentPresenter
                        Grid.RowSpan="2"
                        
                        Cursor="{TemplateBinding Cursor}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>

                                                    <Rectangle Name="VerticalSeparator" Grid.RowSpan="2" Grid.Column="2" Width="1" VerticalAlignment="Stretch" />

                                                    <Path Grid.RowSpan="2" Name="SortIcon" RenderTransformOrigin=".5,.5" HorizontalAlignment="Left" VerticalAlignment="Center" Opacity="0" Grid.Column="1" Stretch="Uniform" Width="8" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z ">
                                                        <Path.Fill>
                                                            <SolidColorBrush Color="#FF444444" />
                                                        </Path.Fill>
                                                        <Path.RenderTransform>
                                                            <TransformGroup>
                                                                <ScaleTransform x:Name="SortIconTransform" ScaleX=".9" ScaleY=".9" />
                                                            </TransformGroup>
                                                        </Path.RenderTransform>
                                                    </Path>
                                                </Grid>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </sdk:DataGrid.ColumnHeaderStyle>
                            <sdk:DataGrid.Columns>
                                <sdk:DataGridTextColumn Header="Key" Width="140" IsReadOnly="True" Binding="{Binding KeyName}" CanUserReorder="False" CanUserResize="True" CanUserSort="True"/>
                                <sdk:DataGridTextColumn Header="Value" Width="300" IsReadOnly="True" Binding="{Binding KeyValue}" CanUserReorder="False" CanUserResize="True" CanUserSort="True"/>
                            </sdk:DataGrid.Columns>
                        </sdk:DataGrid>
                        <Button x:Name="btnAddConfiguration" Grid.Row="3" Content="Add" HorizontalAlignment="Left" Margin="10,380,0,0" VerticalAlignment="Top" Width="100" Click="btnAddConfiguration_Click"/>
                        <Button x:Name="btnRemoveConfiguration" Grid.Row="3" Content="Remove" HorizontalAlignment="Left" Margin="120,380,0,0" VerticalAlignment="Top" Width="100" Click="btnRemoveConfiguration_Click"/>
                        <Button x:Name="btnEditConfiguration" Grid.Row="3" Content="Edit" HorizontalAlignment="Left" Margin="230,380,0,0" VerticalAlignment="Top" Width="100" Click="btnEditConfiguration_Click"/>
                    </Grid>
                </StackPanel>
            </sdk:TabItem>
            <sdk:TabItem Header="Alternate Payment Types" Height="26" VerticalAlignment="Bottom" >
                <StackPanel Margin="0,0,0,0" Orientation="Vertical">
                    <Grid x:Name="LayoutPaymentType" Margin="2,2,1,7" Height="420">
                        <Grid.RowDefinitions>
                            <RowDefinition />
                        </Grid.RowDefinitions>
                        <sdk:DataGrid x:Name="dgPaymentType" SelectionMode="Single" AutoGenerateColumns="False" HorizontalAlignment="Left" Height="355" Margin="10,10,0,0" VerticalAlignment="Top" Width="506">
                            <sdk:DataGrid.ColumnHeaderStyle>
                                <Style  TargetType="sdk:DataGridColumnHeader" >
                                    <Setter Property="FontSize" Value="10" />
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate>
                                                <Grid Name="Root">
                                                    <VisualStateManager.VisualStateGroups>
                                                        <VisualStateGroup x:Name="CommonStates">
                                                            <VisualStateGroup.Transitions>
                                                                <VisualTransition GeneratedDuration="00:00:0.1" />
                                                            </VisualStateGroup.Transitions>
                                                            <VisualState x:Name="Normal" />
                                                            <VisualState x:Name="MouseOver" />
                                                        </VisualStateGroup>
                                                    </VisualStateManager.VisualStateGroups>
                                                    <Grid.RowDefinitions>
                                                        <RowDefinition Height="*" />
                                                        <RowDefinition Height="*" />
                                                        <RowDefinition Height="Auto" />
                                                    </Grid.RowDefinitions>
                                                    <Grid.ColumnDefinitions>
                                                        <ColumnDefinition Width="Auto" />
                                                        <ColumnDefinition Width="*" />
                                                    </Grid.ColumnDefinitions>

                                                    <Rectangle x:Name="BackgroundRectangle" Stretch="Fill" Fill="#FF1F3B53" Grid.ColumnSpan="2" Grid.RowSpan="2"/>

                                                    <Rectangle x:Name="BackgroundGradient" Stretch="Fill" Grid.ColumnSpan="2" Grid.RowSpan="2">
                                                        <Rectangle.Fill>
                                                            <LinearGradientBrush StartPoint=".7,0" EndPoint=".7,1">
                                                                <GradientStop Color="#FFFFFFFF" Offset="0.015" />
                                                                <GradientStop Color="#F9FFFFFF" Offset="0.375" />
                                                                <GradientStop Color="#E5FFFFFF" Offset="0.6" />
                                                                <GradientStop Color="#C6FFFFFF" Offset="1" />
                                                            </LinearGradientBrush>
                                                        </Rectangle.Fill>
                                                    </Rectangle>

                                                    <ContentPresenter
                        Grid.RowSpan="2"
                        
                        Cursor="{TemplateBinding Cursor}"
                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                        Margin="{TemplateBinding Padding}"/>

                                                    <Rectangle Name="VerticalSeparator" Grid.RowSpan="2" Grid.Column="2" Width="1" VerticalAlignment="Stretch" />

                                                    <Path Grid.RowSpan="2" Name="SortIcon" RenderTransformOrigin=".5,.5" HorizontalAlignment="Left" VerticalAlignment="Center" Opacity="0" Grid.Column="1" Stretch="Uniform" Width="8" Data="F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z ">
                                                        <Path.Fill>
                                                            <SolidColorBrush Color="#FF444444" />
                                                        </Path.Fill>
                                                        <Path.RenderTransform>
                                                            <TransformGroup>
                                                                <ScaleTransform x:Name="SortIconTransform" ScaleX=".9" ScaleY=".9" />
                                                            </TransformGroup>
                                                        </Path.RenderTransform>
                                                    </Path>
                                                </Grid>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </sdk:DataGrid.ColumnHeaderStyle>
                            <sdk:DataGrid.Columns>
                                <sdk:DataGridTextColumn Header="ID" Width="140" IsReadOnly="True" Binding="{Binding KeyValue}" CanUserReorder="False" CanUserResize="True" CanUserSort="True"/>
                                <sdk:DataGridTextColumn Header="Name" Width="300" IsReadOnly="True" Binding="{Binding KeyName}" CanUserReorder="False" CanUserResize="True" CanUserSort="True"/>
                            </sdk:DataGrid.Columns>
                        </sdk:DataGrid>
                        <Button x:Name="btnAddPaymentType" Grid.Row="3" Content="Add" HorizontalAlignment="Left" Margin="10,380,0,0" VerticalAlignment="Top" Width="100" Click="btnAddPaymentType_Click"/>
                        <Button x:Name="btnRemovePaymentType" Grid.Row="3" Content="Remove" HorizontalAlignment="Left" Margin="120,380,0,0" VerticalAlignment="Top" Width="100" Click="btnRemovePaymentType_Click"/>
                        <Button x:Name="btnEditPaymentType" Grid.Row="3" Content="Edit" HorizontalAlignment="Left" Margin="230,380,0,0" VerticalAlignment="Top" Width="100" Click="btnEditPaymentType_Click"/>
                    </Grid>
                    </StackPanel>
            </sdk:TabItem>
        </sdk:TabControl>
        
        
    </Grid>

</navigation:Page>
